//
//  MBDEditCell.swift
//  MasterBoy
//
//  Created by kyson on 2023/3/28.
//

import Foundation
import UIKit
import YYText
import SnapKit

class MBDEditCell: MBDCommonCell {
    var infoEditTextField : UITextField!

    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.initialize()
    }
    
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        
        self.initialize()
    }
    
    func initialize() {
        infoEditTextField = UITextField()
        let button = UIButton(frame: CGRectMake(0, 0, 44, 44))
        button.setImage(UIImage(named: "delete"), for: .normal)
        infoEditTextField.rightView = button
        self.commonBackgroundView.addSubview(infoEditTextField)
        
        infoEditTextField.snp.makeConstraints { make in
            make.left.equalTo(self.commonBackgroundView)
            make.top.equalTo(self.commonBackgroundView)
            make.bottom.equalTo(self.commonBackgroundView)
            make.right.equalTo(self.commonBackgroundView).offset(-45)
        }

    }
    
}
